package com.songcha.module_mine.ui.fragment.setting.unregister

import android.os.Bundle
import android.widget.TextView
import com.songcha.library_base.base.BaseFragment
import com.songcha.library_common.ui.view.CustomButton
import com.songcha.library_common.util.JumpUtil
import com.songcha.library_common.util.PackageUtil
import com.songcha.module_mine.R
import com.songcha.module_mine.ui.activity.unregister.UnRegisterAccountActivity

class UnregisterAccountFragment:BaseFragment() {
    init{
        TAG=UnregisterAccountFragment::class.java.simpleName
    }

    override fun getLayoutId(): Int {
        return R.layout.mine_fragment_unregister
    }

    override fun initView(savedInstanceState: Bundle?) {
        super.initView(savedInstanceState)
        if(mRootView==null) return
        mRootView!!.findViewById<TextView>(R.id.mine_tv_tip).apply {
            text = text.toString().replace("\${app_name}", PackageUtil.getAppName(requireContext()))
        }
        mRootView!!.findViewById<CustomButton>(R.id.mine_btn_unregister).setOnClickListener{
            JumpUtil.toActivity(it.context,UnRegisterAccountActivity::class.java)
        }
    }
}